﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@model sipfe.model.dataAccess.SIPMaeDependencia
@using Resources;
@using sipfe.util;

@{   
    Layout = "~/Views/Shared/Layaout/general/_LayoutPopGeneral.cshtml";
    var seleccionable = new List<SelectListItem> { 
        new SelectListItem { Text = "Si", Value = "1"},
        new SelectListItem { Text = "No", Value = "2" }
    };    
}
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.dependenciaJS)" ></script>
<script type="text/javascript">
    $(function () {
        calendarFechaFuturo('dFecIniVig', '1');
    });
</script>
@using (Html.BeginForm("AddHijoAlaDependencia", "DependenciaMante", FormMethod.Post))
{
    @Html.ValidationSummary(true)
    <fieldset style="width:600px;" class="fieldsetStyle1">
        <legend class="tituloBlue9">Actualizar Datos de la Dependencia</legend>
         <table border="1" style="width:580px;" cellpadding="2" cellspacing="0" class="tablaDetalle1">
	     <tbody>							
	        <tr>
                <td style="width: 120px;" class="tituloCelesteB8">Nombre Dependencia</td>
		        <td style="width: 1px;">:</td>
		        <td>@Html.TextBoxFor(model => model.vDescripcion, new { style = "width:430px;text-transform:none;", maxlength = 150}) 
                    @Html.ValidationMessageFor(model => model.vDescripcion)
		        </td>
	        </tr> 
            <tr>
                <td style="width: 120px;" class="tituloCelesteB8">Seleccionable</td>
		        <td style="width: 1px;">:</td>
                 <td>
		            @Html.DropDownList("nBanSel", seleccionable, "--Seleccione--")                    
                    @Html.ValidationMessageFor(model => model.nBanSel)
                 </td>
	        </tr>                                     
             <tr>
                <td style="width: 120px;" class="tituloCelesteB8">Código Dependencia</td>
		        <td style="width: 1px;">:</td>
                <td>@Html.TextBoxFor(model => model.nCodDep, new { style = "width:100px;", maxlength = 16 }) 
                    @Html.ValidationMessageFor(model => model.nCodDep)
                    <img src="@Url.Content("~/images/buscar.gif")" class="lupita2" alt="VER HIJOS DE LA DEPENDNCIA" onclick="javascript:listarCodigoDepHijos();"/>
		        </td>
	        </tr>
             <tr>
                <td class="tituloCelesteB8">Fec. Inicio Vigencia</td>
		        <td>:</td>
		        <td>
                    @Html.TextBoxFor(model => model.dFecIniVig, new { @maxlength = "10", style = "width:60px;" })                    
                    @Html.ValidationMessageFor(model => model.dFecIniVig)
		        </td>
	        </tr>         
            <tr><td colspan="3" align="center"><input type="button" value="Registrar Datos" onclick="javascript:updateDependenciaFinal(this.form);" /></td></tr>
         </tbody>
         </table>       
    </fieldset>       
    @Html.HiddenFor(model => model.dtFecReg, new { Value=@DateTime.Now.ToString()})      
    @Html.HiddenFor(model => model.nIdeUsuReg, new { Value=@Session["nIdeUsuario"]})
    @Html.TextBoxFor(model => model.nIdeDepPadre, new { Value=@ViewBag.DepPapa})
    @Html.TextBoxFor(model => model.nIdeDepRegion, new { Value=@ViewBag.DepRegion})
    @Html.TextBoxFor(model => model.nIdeTipoDep, new { @Value="7"})    
}